package com.wing.oauth2.exception;


import com.wing.common.utils.JsonResult;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ApiException extends RuntimeException {

    private int code;

    private String msg;

    public ApiException(int code, String message) {
        this.code = code;
        this.msg = message;
    }

    public ApiException(String message) {
        this.code = JsonResult.Code.INVALID_REQUEST.getCode();
        this.msg = message;
    }
}
